Optimal. Leaf size=157 \[ -\frac {b (4 f h-3 e i+f i x)^2}{4 d f^3}-\frac {b (f h-e i)^2 \log ^2(e+f x)}{2 d f^3}+\frac {2 i (f h-e i) (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}+\frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2458, 12, 45,
2372, 14, 2338} \begin {gather*} \frac {(f h-e i)^2 \log (e+f x) (a+b \log (c (e+f x)))}{d f^3}+\frac {2 i (e+f x) (f h-e i) (a+b \log (c (e+f x)))}{d f^3}+\frac {i^2 (e+f x)^2 (a+b \log (c (e+f x)))}{2 d f^3}-\frac {b (-3 e i+4 f h+f i x)^2}{4 d f^3}-\frac {b (f h-e i)^2 \log ^2(e+f x)}{2 d f^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 14
Rule 45
Rule 2338
Rule 2372
Rule 2458
Rubi steps
\begin {align*} \int \frac {(h+177 x)^2 (a+b \log (c (e+f x)))}{d e+d f x} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (\frac {-177 e+f h}{f}+\frac {177 x}{f}\right )^2 (a+b \log (c x))}{d x} \, dx,x,e+f x\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {\left (\frac {-177 e+f h}{f}+\frac {177 x}{f}\right )^2 (a+b \log (c x))}{x} \, dx,x,e+f x\right )}{d f}\\ &=-\frac {\left (\frac {708 (177 e-f h) (e+f x)}{f^2}-\frac {31329 (e+f x)^2}{f^2}-\frac {2 (177 e-f h)^2 \log (e+f x)}{f^2}\right ) (a+b \log (c (e+f x)))}{2 d f}-\frac {b \text {Subst}\left (\int \frac {-177 (708 e-4 f h-177 x) x+2 (-177 e+f h)^2 \log (x)}{2 f^2 x} \, dx,x,e+f x\right )}{d f}\\ &=-\frac {\left (\frac {708 (177 e-f h) (e+f x)}{f^2}-\frac {31329 (e+f x)^2}{f^2}-\frac {2 (177 e-f h)^2 \log (e+f x)}{f^2}\right ) (a+b \log (c (e+f x)))}{2 d f}-\frac {b \text {Subst}\left (\int \frac {-177 (708 e-4 f h-177 x) x+2 (-177 e+f h)^2 \log (x)}{x} \, dx,x,e+f x\right )}{2 d f^3}\\ &=-\frac {\left (\frac {708 (177 e-f h) (e+f x)}{f^2}-\frac {31329 (e+f x)^2}{f^2}-\frac {2 (177 e-f h)^2 \log (e+f x)}{f^2}\right ) (a+b \log (c (e+f x)))}{2 d f}-\frac {b \text {Subst}\left (\int \left (-177 (708 e-4 f h-177 x)+\frac {2 (177 e-f h)^2 \log (x)}{x}\right ) \, dx,x,e+f x\right )}{2 d f^3}\\ &=-\frac {b (531 e-4 f h-177 f x)^2}{4 d f^3}-\frac {\left (\frac {708 (177 e-f h) (e+f x)}{f^2}-\frac {31329 (e+f x)^2}{f^2}-\frac {2 (177 e-f h)^2 \log (e+f x)}{f^2}\right ) (a+b \log (c (e+f x)))}{2 d f}-\frac {\left (b (177 e-f h)^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,e+f x\right )}{d f^3}\\ &=-\frac {b (531 e-4 f h-177 f x)^2}{4 d f^3}-\frac {b (177 e-f h)^2 \log ^2(e+f x)}{2 d f^3}-\frac {\left (\frac {708 (177 e-f h) (e+f x)}{f^2}-\frac {31329 (e+f x)^2}{f^2}-\frac {2 (177 e-f h)^2 \log (e+f x)}{f^2}\right ) (a+b \log (c (e+f x)))}{2 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 214, normalized size = 1.36 \begin {gather*} \frac {2 a^2 f^2 h^2-4 a^2 e f h i+2 a^2 e^2 i^2+8 a b f^2 h i x-8 b^2 f^2 h i x-4 a b e f i^2 x+6 b^2 e f i^2 x+2 a b f^2 i^2 x^2-b^2 f^2 i^2 x^2-2 b^2 e^2 i^2 \log (e+f x)+2 b \left (2 a (f h-e i)^2+b i \left (-2 e^2 i+e f (4 h-2 i x)+f^2 x (4 h+i x)\right )\right ) \log (c (e+f x))+2 b^2 (f h-e i)^2 \log ^2(c (e+f x))}{4 b d f^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(337\) vs.
\(2(151)=302\).
time = 0.48, size = 338, normalized size = 2.15
method | result | size |
norman | \(\frac {\left (2 a \,e^{2} i^{2}-4 a e f h i +2 a \,f^{2} h^{2}-3 b \,e^{2} i^{2}+4 b e f h i \right ) \ln \left (c \left (f x +e \right )\right )}{2 d \,f^{3}}+\frac {b \left (e^{2} i^{2}-2 e f h i +f^{2} h^{2}\right ) \ln \left (c \left (f x +e \right )\right )^{2}}{2 d \,f^{3}}-\frac {i \left (2 a e i -4 a f h -3 b e i +4 b f h \right ) x}{2 d \,f^{2}}+\frac {i^{2} \left (2 a -b \right ) x^{2}}{4 d f}+\frac {b \,i^{2} x^{2} \ln \left (c \left (f x +e \right )\right )}{2 d f}-\frac {b i \left (e i -2 f h \right ) x \ln \left (c \left (f x +e \right )\right )}{d \,f^{2}}\) | \(202\) |
risch | \(\frac {b \ln \left (c \left (f x +e \right )\right )^{2} e^{2} i^{2}}{2 d \,f^{3}}-\frac {b \ln \left (c \left (f x +e \right )\right )^{2} e h i}{d \,f^{2}}+\frac {b \ln \left (c \left (f x +e \right )\right )^{2} h^{2}}{2 d f}-\frac {b i x \left (-f i x +2 e i -4 f h \right ) \ln \left (c \left (f x +e \right )\right )}{2 d \,f^{2}}+\frac {a \,i^{2} x^{2}}{2 d f}-\frac {b \,i^{2} x^{2}}{4 d f}+\frac {\ln \left (f x +e \right ) a \,e^{2} i^{2}}{d \,f^{3}}-\frac {2 \ln \left (f x +e \right ) a e h i}{d \,f^{2}}+\frac {\ln \left (f x +e \right ) a \,h^{2}}{d f}-\frac {3 \ln \left (f x +e \right ) b \,e^{2} i^{2}}{2 d \,f^{3}}+\frac {2 \ln \left (f x +e \right ) b e h i}{d \,f^{2}}-\frac {a e \,i^{2} x}{d \,f^{2}}+\frac {2 a h i x}{d f}+\frac {3 b e \,i^{2} x}{2 d \,f^{2}}-\frac {2 b h i x}{d f}\) | \(280\) |
derivativedivides | \(\frac {\frac {c a \,e^{2} i^{2} \ln \left (c f x +c e \right )}{f^{2} d}-\frac {2 c a e h i \ln \left (c f x +c e \right )}{f d}+\frac {c a \,h^{2} \ln \left (c f x +c e \right )}{d}-\frac {2 a e \,i^{2} \left (c f x +c e \right )}{f^{2} d}+\frac {2 a h i \left (c f x +c e \right )}{f d}+\frac {a \,i^{2} \left (c f x +c e \right )^{2}}{2 c \,f^{2} d}+\frac {c b \,e^{2} i^{2} \ln \left (c f x +c e \right )^{2}}{2 f^{2} d}-\frac {c b e h i \ln \left (c f x +c e \right )^{2}}{f d}+\frac {c b \,h^{2} \ln \left (c f x +c e \right )^{2}}{2 d}-\frac {2 b e \,i^{2} \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f^{2} d}+\frac {2 b h i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}+\frac {b \,i^{2} \left (\frac {\left (c f x +c e \right )^{2} \ln \left (c f x +c e \right )}{2}-\frac {\left (c f x +c e \right )^{2}}{4}\right )}{c \,f^{2} d}}{c f}\) | \(338\) |
default | \(\frac {\frac {c a \,e^{2} i^{2} \ln \left (c f x +c e \right )}{f^{2} d}-\frac {2 c a e h i \ln \left (c f x +c e \right )}{f d}+\frac {c a \,h^{2} \ln \left (c f x +c e \right )}{d}-\frac {2 a e \,i^{2} \left (c f x +c e \right )}{f^{2} d}+\frac {2 a h i \left (c f x +c e \right )}{f d}+\frac {a \,i^{2} \left (c f x +c e \right )^{2}}{2 c \,f^{2} d}+\frac {c b \,e^{2} i^{2} \ln \left (c f x +c e \right )^{2}}{2 f^{2} d}-\frac {c b e h i \ln \left (c f x +c e \right )^{2}}{f d}+\frac {c b \,h^{2} \ln \left (c f x +c e \right )^{2}}{2 d}-\frac {2 b e \,i^{2} \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f^{2} d}+\frac {2 b h i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}+\frac {b \,i^{2} \left (\frac {\left (c f x +c e \right )^{2} \ln \left (c f x +c e \right )}{2}-\frac {\left (c f x +c e \right )^{2}}{4}\right )}{c \,f^{2} d}}{c f}\) | \(338\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 360 vs. \(2 (155) = 310\).
time = 0.33, size = 360, normalized size = 2.29 \begin {gather*} -\frac {1}{2} \, b h^{2} {\left (\frac {2 \, \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {\log \left (f x + e\right )^{2} + 2 \, \log \left (f x + e\right ) \log \left (c\right )}{d f}\right )} + 2 i \, b h {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} \log \left (c f x + c e\right ) + 2 i \, a h {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} - \frac {1}{2} \, b {\left (\frac {f x^{2} - 2 \, x e}{d f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{d f^{3}}\right )} \log \left (c f x + c e\right ) + \frac {b h^{2} \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {1}{2} \, a {\left (\frac {f x^{2} - 2 \, x e}{d f^{2}} + \frac {2 \, e^{2} \log \left (f x + e\right )}{d f^{3}}\right )} + \frac {a h^{2} \log \left (d f x + d e\right )}{d f} + \frac {i \, {\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} b h}{d f^{2}} + \frac {{\left (f^{2} x^{2} - 6 \, f x e + 2 \, e^{2} \log \left (f x + e\right )^{2} + 6 \, e^{2} \log \left (f x + e\right )\right )} b}{4 \, d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 156, normalized size = 0.99 \begin {gather*} -\frac {8 \, {\left (-i \, a + i \, b\right )} f^{2} h x + {\left (2 \, a - b\right )} f^{2} x^{2} - 2 \, {\left (2 \, a - 3 \, b\right )} f x e - 2 \, {\left (b f^{2} h^{2} - 2 i \, b f h e - b e^{2}\right )} \log \left (c f x + c e\right )^{2} - 2 \, {\left (2 \, a f^{2} h^{2} + 4 i \, b f^{2} h x - b f^{2} x^{2} - {\left (2 \, a - 3 \, b\right )} e^{2} - 2 \, {\left (2 \, {\left (i \, a - i \, b\right )} f h - b f x\right )} e\right )} \log \left (c f x + c e\right )}{4 \, d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.44, size = 226, normalized size = 1.44 \begin {gather*} x^{2} \left (\frac {a i^{2}}{2 d f} - \frac {b i^{2}}{4 d f}\right ) + x \left (- \frac {a e i^{2}}{d f^{2}} + \frac {2 a h i}{d f} + \frac {3 b e i^{2}}{2 d f^{2}} - \frac {2 b h i}{d f}\right ) + \frac {\left (- 2 b e i^{2} x + 4 b f h i x + b f i^{2} x^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}}{2 d f^{2}} + \frac {\left (b e^{2} i^{2} - 2 b e f h i + b f^{2} h^{2}\right ) \log {\left (c \left (e + f x\right ) \right )}^{2}}{2 d f^{3}} + \frac {\left (2 a e^{2} i^{2} - 4 a e f h i + 2 a f^{2} h^{2} - 3 b e^{2} i^{2} + 4 b e f h i\right ) \log {\left (e + f x \right )}}{2 d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.30, size = 235, normalized size = 1.50 \begin {gather*} \frac {2 \, b f^{2} h^{2} \log \left (c f x + c e\right )^{2} + 8 i \, b f^{2} h x \log \left (c f x + c e\right ) - 2 \, b f^{2} x^{2} \log \left (c f x + c e\right ) - 4 i \, b f h e \log \left (c f x + c e\right )^{2} + 4 \, a f^{2} h^{2} \log \left (f x + e\right ) + 8 i \, a f^{2} h x - 8 i \, b f^{2} h x - 2 \, a f^{2} x^{2} + b f^{2} x^{2} + 4 \, b f x e \log \left (c f x + c e\right ) - 8 i \, a f h e \log \left (f x + e\right ) + 8 i \, b f h e \log \left (f x + e\right ) + 4 \, a f x e - 6 \, b f x e - 2 \, b e^{2} \log \left (c f x + c e\right )^{2} - 4 \, a e^{2} \log \left (f x + e\right ) + 6 \, b e^{2} \log \left (f x + e\right )}{4 \, d f^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.35, size = 208, normalized size = 1.32 \begin {gather*} x\,\left (\frac {i\,\left (2\,a\,f\,h+b\,e\,i-2\,b\,f\,h\right )}{d\,f^2}-\frac {e\,i^2\,\left (2\,a-b\right )}{2\,d\,f^2}\right )+f\,\ln \left (c\,\left (e+f\,x\right )\right )\,\left (\frac {b\,i^2\,x^2}{2\,d\,f^2}-\frac {b\,i\,x\,\left (e\,i-2\,f\,h\right )}{d\,f^3}\right )+\frac {\ln \left (e+f\,x\right )\,\left (2\,a\,e^2\,i^2+2\,a\,f^2\,h^2-3\,b\,e^2\,i^2-4\,a\,e\,f\,h\,i+4\,b\,e\,f\,h\,i\right )}{2\,d\,f^3}+\frac {b\,{\ln \left (c\,\left (e+f\,x\right )\right )}^2\,\left (e^2\,i^2-2\,e\,f\,h\,i+f^2\,h^2\right )}{2\,d\,f^3}+\frac {i^2\,x^2\,\left (2\,a-b\right )}{4\,d\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________